// resizeListener.ts
import { App } from 'vue'
import { isMobile } from '@/utils/currency'
import { Router } from 'vue-router'

// 窗口大小变化的监听逻辑
export function addResizeListener(app: App, router: Router) {
    window.addEventListener('resize', () => {
        app.config.globalProperties.$isMobile = isMobile()
        router.go(0) // 重新加载当前路由
    })
}
